class Tutorial < ActiveRecord::Base
  belongs_to :tutorial_category
  belongs_to :member
  has_many :comments, {:as => :commentable, :dependent => :delete_all}
  validates_presence_of :name, :description, :content, :slug, :tutorial_category_id

  def url
    return '/tutorial/' + self.slug
  end

  
end
